-Tests: build
+Test-Command: env GDK_BACKEND=x11 debian/tests/build
+Features: test-name=build-x11
+Classes: desktop, x11
Depends: build-essential, libgtk-4-dev, xauth, xvfb
Restrictions: allow-stderr, superficial
-Tests: python3-gi
+Test-Command: env GDK_BACKEND=wayland debian/tests/build
+Features: test-name=build-wayland
+Classes: desktop, wayland, linux-only
+Depends: build-essential, libgtk-4-dev, weston
+# Architecture: linux-any
+Restrictions: allow-stderr, superficial
+
+Test-Command: env GDK_BACKEND=x11 debian/tests/python3-gi
+Features: test-name=python3-gi-x11
+Classes: desktop, x11
Depends: dbus, gir1.2-gtk-4.0, python3-gi (>= 3.40), xauth, xvfb
-# https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/81, !145, etc.
-Restrictions: flaky, superficial
+Restrictions: superficial
-Tests: installed-tests
+Test-Command: env GDK_BACKEND=wayland debian/tests/python3-gi
+Features: test-name=python3-gi-wayland
+Classes: desktop, wayland, linux-only
+Depends: dbus, gir1.2-gtk-4.0, libgl1, libgl1-mesa-dri, python3-gi (>= 3.40), weston
+# Architecture: linux-any
+Restrictions: superficial
+
+Test-Command: env GDK_BACKEND=x11 debian/tests/installed-tests
+Features: test-name=installed-tests-x11
+Classes: desktop, x11
Depends: dbus (>= 1.8), fonts-dejavu-core, gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, ttf-bitstream-vera, xauth, xvfb
Restrictions: allow-stderr
-Tests: installed-tests-flaky
+Test-Command: env GDK_BACKEND=wayland debian/tests/installed-tests
+Features: test-name=installed-tests-wayland
+Classes: desktop, wayland, linux-only
+Depends: dbus (>= 1.8), fonts-dejavu-core, gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, ttf-bitstream-vera, weston
+# Architecture: linux-any
+Restrictions: allow-stderr
+
+Test-Command: env GDK_BACKEND=x11 debian/tests/installed-tests-flaky
+Features: test-name=installed-tests-flaky-x11
+Classes: desktop, x11
Depends: dbus (>= 1.8), fonts-dejavu-core, gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, ttf-bitstream-vera, xauth, xvfb
Restrictions: allow-stderr, flaky
+
+Test-Command: env GDK_BACKEND=wayland debian/tests/installed-tests-flaky
+Features: test-name=installed-tests-flacky-wayland
+Classes: desktop, wayland, linux-only
+Depends: dbus (>= 1.8), fonts-dejavu-core, gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, ttf-bitstream-vera, weston
+# Architecture: linux-any
+Restrictions: allow-stderr, flaky
#!/bin/sh
-# We don't test under Wayland yet, because we don't have a Wayland
-# equivalent of xvfb-run
-export GDK_BACKEND=x11
-
-xvfb-run -a -s "-screen 0 1024x768x24" \
+debian/tests/run-with-display $GDK_BACKEND \
+dbus-run-session \
python3 <<EOF
+import gi
+gi.require_version('Gtk', '4.0')
from gi.repository import GLib, Gtk
+loop = GLib.MainLoop()
+
def do_quit(user_data):
- Gtk.main_quit()
+ window.destroy()
+ loop.quit()
return GLib.SOURCE_REMOVE
-dialog = Gtk.Dialog()
-dialog.set_title('Test dialog')
-dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)
-dialog.show_all()
+window = Gtk.Window()
+window.set_title('Test Window')
+window.show()
GLib.timeout_add_seconds(1, do_quit, None)
-Gtk.main()
+
+loop.run()
EOF